
<!DOCTYPE HTML>
<html lang="" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>ffmpeg日常命令-overlay · GitBook</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    
    <link rel="prev" href="chromakey.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../Github.html">
            
                <a href="../Github.html">
            
                    
                    Github相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../GitLab.html">
            
                <a href="../GitLab.html">
            
                    
                    GitLab使用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../Git创建本地仓库，添加钩子.html">
            
                <a href="../Git创建本地仓库，添加钩子.html">
            
                    
                    Git创建本地仓库，添加钩子
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../gitbook.html">
            
                <a href="../gitbook.html">
            
                    
                    gitbook相关
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="chromakey.html">
            
                <a href="chromakey.html">
            
                    
                    ffmpeg日常命令-chromakey
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.7" data-path="overlay.html">
            
                <a href="overlay.html">
            
                    
                    ffmpeg日常命令-overlay
            
                </a>
            

            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >ffmpeg日常命令-overlay</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5C06;&#x56FE;&#x7247;&#x9010;&#x5E27;&#x4F5C;&#x4E3A;&#x6C34;&#x5370;">&#x5C06;&#x56FE;&#x7247;&#x9010;&#x5E27;&#x4F5C;&#x4E3A;&#x6C34;&#x5370;</h1>
<p>&#x770B;&#x5230;&#x6709;&#x4E2A;&#x9700;&#x8981;&#xFF0C;&#x5C06;&#x4E00;&#x4E9B;&#x56FE;&#x7247;&#x4F5C;&#x4E3A;&#x6C34;&#x5370;&#xFF0C;&#x9010;&#x5E27;&#x5230;&#x89C6;&#x9891;&#xFF1A;</p>
<pre><code>ffmpeg -i %d.png -i video.mp4 -filter_complex &quot;[1:v][0:v]overlay=x=0:y=0&quot; out.mp4
</code></pre><h2 id="&#x53E6;&#x5916;&#x4E00;&#x4E2A;&#x9700;&#x6C42;&#xFF0C;&#x8FD9;&#x4E9B;&#x56FE;&#x7247;&#x53EF;&#x80FD;&#x4F1A;&#x53D8;&#x52A8;&#x4F4D;&#x7F6E;">&#x53E6;&#x5916;&#x4E00;&#x4E2A;&#x9700;&#x6C42;&#xFF0C;&#x8FD9;&#x4E9B;&#x56FE;&#x7247;&#x53EF;&#x80FD;&#x4F1A;&#x53D8;&#x52A8;&#x4F4D;&#x7F6E;</h2>
<pre><code>ffmpeg -i %d.png -f lavfi -i nullsrc=s=1920x1080 -filter_complex &quot;[1:v][0:v]overlay=x=&apos;if(gte(t,2), -w+(t-2)*20, NAN)&apos;:y=0&quot; -vcodec h264_videotoolbox -b:v 2000k a.ts
</code></pre><p>&#x6765;&#x81EA;&#x5927;&#x5E08;&#x5144;&#x7684;&#x547D;&#x4EE4;&#xFF0C;&#x540E;&#x7EED;&#x7814;&#x7A76;&#x900F;&#x4E86;&#x518D;&#x8865;&#x5145;</p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="chromakey.html" class="navigation navigation-prev navigation-unique" aria-label="Previous page: ffmpeg日常命令-chromakey">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"ffmpeg日常命令-overlay","level":"1.7","depth":1,"previous":{"title":"ffmpeg日常命令-chromakey","level":"1.6","depth":1,"path":"ffmpeg/chromakey.md","ref":"ffmpeg/chromakey.md","articles":[]},"dir":"ltr"},"config":{"gitbook":"*","theme":"default","variables":{},"plugins":[],"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"}},"file":{"path":"ffmpeg/overlay.md","mtime":"2019-07-12T10:26:13.545Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-07-12T10:31:31.936Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

